<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    三、使用Set数据结构对以下对象数组去重
</body>

</html>
<script>
    let user = [
        { id: 1, name: "李四", age: 20 },
        { id: 2, name: "张三", age: 30 },
        { id: 1, name: "李四", age: 20 }
    ]
    let user1 = user.map((item)=>JSON.stringify(item));
    let user2 = [...new Set(user1)]
    let user3 = user2.map((item)=>JSON.parse(item))
    console.log(user3);
</script>